// TOWN DIALOGUE SCRIPT
//    Town 5: Philippi

// This is the dialogue for this town.
// You can use states numbered from 1 to 99.

begintalkscript;

variables;

short choice;

// *** Guards ***
begintalknode 1;
	state = -1;
	personality = -1;
	nextstate = -1;
	condition = 1;
	question = "Guard";
	text1 = "The guard looks in your direction.";
	text2 = "_Please move along now._ the guard says.";
	text3 = "_Enjoy your stay and don't cause problems._ the guard says.";
	text4 = "The guard appears to be giving you a good once over look.";
	text5 = "_Welcome to Philippi visitor._ the guard says.";
	text6 = "The guard sizes you up, then looks away after determining you're not really a thief.";
	text7 = "_Stay out of trouble._ the guard says.";
	text8 = "_Enjoy your visit and don't get into trouble._ the guard says.";
	action = END_TALK;
	code =
		clear_strings();
		add_string(1);
		add_string(get_ran(1, 2, 8));
	break;

// *** Townsmen ***
begintalknode 2;
	state = -1;
	personality = -1;
	nextstate = -1;
	condition = 1;
	question = "Townsman";
	text1 = "The man stops and looks at you as you approach.";
	text2 = "_Howdy strangers, enjoy your stay._ he says before getting back to what he was doing.";
	text3 = "He ignores your pleas and continues on his way.";
	text4 = "_Can't stop and chat, have a very important date._ he says moving on.";
	text5 = "The man bobs his head in your direction, then keeps going.";
	text6 = "The man gives a cheery wave and says _Hi._, but otherwise ignores you.";
	text7 = "The stop doesn't last long as it appears the man is lost in thought, and looks right through you.";
	text8 = "_Humph, can't you see I'm busy._ the man says, before brushing by you.";
	action = END_TALK;
	code =
		clear_strings();
		add_string(1);
		add_string(get_ran(1, 2, 8));
	break;

// *** Townswomen ***
begintalknode 3;
	state = -1;
	personality = -1;
	nextstate = -1;
	condition = 1;
	question = "Townswoman";
	text1 = "The woman stops and looks at you as you approach.";
	text2 = "_Howdy all.  Enjoy your visit to our fair city._ she says before moving on.";
	text3 = "_Well, what do you want._ the woman states, then brushes by you.";
	text4 = "The woman sizes up your threat, then continues on her way, obviously not at all worried.";
	text5 = "_Sorry, have an appointment, will talk next time._ she says continuing on her way.";
	text6 = "_Have you seen my dog?_ she asks _It seems to be missing._  She then moves on.";
	text7 = "_How goes your quest strangers?_ she asks, really just being polite at your intrusion.";
	text8 = "Once she realizes you have nothing to add to her day, she continues on her way.";
	action = END_TALK;
	code =
		clear_strings();
		add_string(1);
		add_string(get_ran(1, 2, 8));
	break;

// *** Children ***
begintalknode 4;
	state = -1;
	personality = -1;
	nextstate = -1;
	condition = 1;
	question = "Child";
	text1 = "The child looks at you with a look of wonder why an adult would be talking to them.";
	text2 = "_Have you heard of 'bob'?_ the child asks before skipping away.";
	text3 = "_I don't talk to strangers._ the child says before running away.";
	text4 = "_Leave me alone you meanie!_ the child exclaims.";
	text5 = "The child then ignores you and moves on.";
	text6 = "The child pulls out a whistle and starts blowing until you move away.";
	text7 = "_La de da da._ the child sings, totally ignoring your questions.";
	text8 = "_Look what I can do._ the child says, jumping around like a rag doll, then moving off.";
	action = END_TALK;
	code =
		clear_strings();
		add_string(1);
		add_string(get_ran(1, 2, 8));
	break;

// *** Stranded Sailors ***
begintalknode 5;
	state = -1;
	personality = -1;
	nextstate = -1;
	condition = 1;
	question = "Sailor";
	text1 = "The sailor looks in your direction hoping you have a ship to berth on.";
	text2 = "The sailor looks away after determining you don't.";
	text3 = "_You have a ship ready to sail?_ the sailor asks hopefully before realizing you don't.";
	text4 = "The sailor says _We'll sail one day again._ before turning away.";
	text5 = "_When will the ships start sailing?_ the sailor moans ignoring your questions.";
	text6 = "The sailor looks moodily away, still pining after a ship to sail with.";
	text7 = "_Leave me in peace, unless you have a ship to sail with._ the sailor says.";
	text8 = "The sailor turns away in stony silence, oblivious to your questions.";
	action = END_TALK;
	code =
		clear_strings();
		add_string(1);
		add_string(get_ran(1, 2, 8));
	break;

// *** Mayor Tom ***
begintalknode 11;
	state = -1;
	personality = 533;
	nextstate = 12;
	condition = 1;
	question = "Mayor Tom";
	text1 = "The mayor seems pretty busy, working out defenses, keeping the city vibrant and whole.";
	text2 = "_Howdy folks, I'm Major, err, Mayor Tom._ he says.";
	text3 = "_What can I do for you?_ he asks.";
	text5 = "Mayor Tom seems to still be busy.";
	text6 = "He stops and asks _Can I help you folks with something?_";
	action = INTRO;

begintalknode 12;
	state = 12;
	personality = 533;
	nextstate = -1;
	condition = 1;
	question = "What do you do?";
	text1 = "The mayor looks like he doesn't know whether to laugh or be mad.";
	text2 = "He finally just grins and replies _I am the mayor of Philippi._";
	text3 = "_You did pass a sign and my assistant right?_ he inquires, looking for signs of special needs within your party.";

begintalknode 13;
	state = 12;
	personality = 533;
	nextstate = -1;
	condition = 1;
	question = "How goes the defense?";
	text1 = "The mayor answers _It gets harder every day._";
	text2 = "_Hopefully, one day the curse will be lifted and The Wilderness will be free once again._";
	text3 = "Mayor Tom looks at you hopefully _Are you the rumored saviors?_";

begintalknode 14;
	state = 12;
	personality = 533;
	nextstate = 16;
	condition = 1;
	question = "Any way into the sewers?";
	text1 = "Mayor Tom says _No, we used to have them unlocked._";
	text2 = "_But after a couple of kids drown and then those Zanta followers infesting the tunnels, we locked them up._";
	text3 = "_You should stay out of them, they are dangerous._ he adds.";

begintalknode 15;
	state = 12;
	personality = 533;
	nextstate = -1;
	condition = 1;
	question = "Goodbye.";
	text1 = "_Goodbye_ Mayor Tom says _Enjoy our fair city._";
	action = END_TALK;

begintalknode 16;
	state = 16;
	personality = 533;
	nextstate = -1;
	condition = 1;
	question = "What about the Zanta followers?";
	text1 = "Mayor Tom replies _When Zanta was being chased after stealing our staff, some of his followers were seen in the sewers._";
	text2 = "_We, of course, locked up the sewer covers to keep them from attacking the citizens of Philippi._";
	text3 = "He pauses _It was a public safety issue, to protect the children._";
	text4 = "_No more followers of Zanta were ever seen in Philippi after that._ the mayor adds.";

// *** Nadya ***
begintalknode 21;
	state = -1;
	personality = 534;
	nextstate = 22;
	condition = 1;
	question = "Nadya";
	text1 = "A woman is busy strumming some sort of instrument behind the bar, the playing is not bad.";
	text2 = "Occasionally, you see her stop and serve the customers at the counter.";
	text3 = "As you get close, she stops playing long enough to say _Hello, I'm Nadya._";
	text4 = "_Let me know if you want anything._ she adds before starting to play again.";
	text5 = "Nadya is busy singing a song about a yellow, porous fellow.";
	text6 = "She stops long enough to say _Let me know if you want anything._";
	action = INTRO;
	code =
		set_flag(5, 8, FALSE);
	break;

begintalknode 22;
	state = 22;
	personality = 534;
	nextstate = -1;
	condition = 1;
	question = "What do you sell?";
	text1 = "Nadya replies _Just a cold frothy mug of ale._";
	text2 = "She returns to playing the quite catchy tune she was on before.";

begintalknode 23;
	state = 22;
	personality = 534;
	nextstate = 26;
	condition = 1;
	question = "I like a mug of ale please.";
	text1 = "_A mug of ale is 4 coins, ok?_ asks Nadya.";
	text2 = "She awaits your reply.";
	code =
		set_flag(5, 8, TRUE);
	break;

begintalknode 24;
	state = 22;
	personality = 534;
	nextstate = -1;
	condition = 1;
	question = "Heard any good rumors?";
	text1 = "Nadya stops playing, thinking for a moment.";
	text2 = "_I heard that not all the sewer covers were locked down._ she says.";
	text3 = "_A little birdie whispered to me that 'Bob' was the man._ she says.";
	text4 = "_The rumor is that at least one Zanta follower went into the sewers before they were sealed._ she says.";
	text5 = "_Haven't heard anything new today._ she says.";
	text6 = "She grins and says _The captain isn't happy with his new duties._";
	text7 = "_Have another drink, I may have something then._ she says.";
	text8 = "_Nope, I have nothing, but have a drink._ she says.";
	code =
		clear_strings();
		add_string(1);
		add_string(get_ran(1, 2, 8));
	break;

begintalknode 25;
	state = 22;
	personality = 534;
	nextstate = -1;
	condition = 1;
	question = "Goodbye";
	text1 = "Nadya gives you a little wave, without a noticeable pause in her song playing.";
	text2 = "She is good.";
	action = END_TALK;

begintalknode 26;
	state = 26;
	personality = 534;
	nextstate = -1;
	condition = (get_flag(5, 8) == TRUE);
	question = "No thanks, not right now.";
	text1 = "Nadya returns to her playing.";
	text2 = "_Let me know if you'd like something later_ she says.";
	code =
		set_flag(5, 8, FALSE);
	break;

begintalknode 27;
	state = 26;
	personality = 534;
	nextstate = -1;
	condition = (get_flag(5, 8) == TRUE);
	question = "Yes please, I'm thirsty.";
	text1 = "Nadya stops playing long enough to serve you a big frosty mug of ale.";
	text3 = "_You don't have enough coins.  Come back when you do_ Nadya says.";
	text4 = "She hardly had to pause her song.";
	text5 = "Nadya smiles and says _Let me know if you want one later._";
	text6 = "She returns to playing her song.";
	text7 = "Nadya says _You are too drunk for me to serve.  Go sleep it off first._";
	text8 = "You're dimly aware that she continued playing the song where she left off.";
	code =
		set_flag(5, 8, FALSE);
		clear_strings();
		if (coins_amount() < 4) {
			add_string(3);
			add_string(4);
		}
		else if (run_select_a_pc(1) == FALSE) {
			add_string(5);
			add_string(6);
		}
		else {
			if (get_char_status(get_selected_pc(), 28) >= 20) {
				add_string(7);
				add_string(8);
			}
			else {
				play_sound(24);
				add_string(1);
				change_coins(-4);
				// make drunk
				set_char_status(get_selected_pc(), 28, 10, TRUE, FALSE);
			}
		}
	break;

// *** Origen ***
begintalknode 31;
	state = -1;
	personality = 535;
	nextstate = 32;
	condition = 1;
	question = "Origen";
	text1 = "A man is busy serving a few customers around the room.";
	text2 = "He smiles as you get close _Hello travelers.  My name is Origen._";
	text3 = "_What can I do you for?_ he asks.";
	text5 = "Origen smiles at you as you approach him.";
	text6 = "_Welcome back and let me know if I can do anything for you._ he says.";
	action = INTRO;

begintalknode 32;
	state = 32;
	personality = 535;
	nextstate = -1;
	condition = 1;
	question = "What can I get here?";
	text1 = "Origen answers _I can get you a little food or a place to get a little rest if you wish._";
	text2 = "_What'll it be?_ he inquires.";

begintalknode 33;
	state = 32;
	personality = 535;
	nextstate = -1;
	condition = 1;
	question = "Can I see your food menu?";
	text1 = "You finish ordering food from Origen.";
	code =
		begin_shop_mode("Sailors Roost", "Origen provides a selection of food for the weary traveler.  The prices are average.", 1, 3, -1);
	break;

begintalknode 34;
	state = 32;
	personality = 535;
	nextstate = -1;
	condition = (has_special_item(11) == 0);
	question = "Can I get a room (100 coins)?";
	text1 = "_Rooms are 100 coins and you don't have enough._ Origen says.";
	text3 = "Origen gives you a key _All are open right now, take your pick._";
	code =
		clear_strings();
		if (coins_amount() < 100) 
			add_string(1);
		else {
			add_string(3);
			change_spec_item(11, 1);
			change_coins(-100);
			set_flag(5, 1, TRUE);
		}
	break;

begintalknode 35;
	state = 32;
	personality = 535;
	nextstate = -1;
	condition = 1;
	question = "Don't need nothing, thank you.";
	text1 = "Origen turns to serve another customer saying _All right then, come back again._";
	action = END_TALK;

// *** Adelard ***
begintalknode 41;
	state = -1;
	personality = 536;
	nextstate = 42;
	condition = 1;
	question = "Adelard";
	text1 = "The mayor's assistant is glowering at some paperwork on his desk.";
	text2 = "He looks up as you approach _I'm Adelard, Captain Adelard._";
	text3 = "_What do you want?_";
	text5 = "Adelard grunts as you get close.";
	text6 = "_Back again are you._ he states.";
	action = INTRO;
	code =
		set_flag(5, 5, TRUE);
	break;

begintalknode 42;
	state = 42;
	personality = 536;
	nextstate = -1;
	condition = 1;
	question = "What are you Captain of?";
	text1 = "Adelard seems ready to pounce _I am the Captain of the Philippi guard._ he says.";
	text2 = "_Due to shortages of personnel, I have to help out here in the mayor's office also._";
	text3 = "_Dang assistant duties._ he mumbles under his breath, hardly hearable three doors away.";

begintalknode 43;
	state = 42;
	personality = 536;
	nextstate = -1;
	condition = (get_flag(5, 6) == FALSE);
	question = "I'd like to see the mayor.";
	text1 = "_Ok_ Adelard says _You'll need to sign the visitor log first._ he adds.";
	text2 = "He hands you a pen so you can sign where he is indicating in the guest book.";
	code =
		set_flag(5, 6, TRUE);
	break;

begintalknode 44;
	state = 42;
	personality = 536;
	nextstate = -1;
	condition = 1;
	question = "Adios";
	text1 = "Adelard snorts, then goes back to glowering at the paperwork surrounding him.";
	action = END_TALK;

// *** Thalia ***
begintalknode 51;
	state = -1;
	personality = 537;
	nextstate = 52;
	condition = 1;
	question = "Thalia";
	text1 = "A woman is busy behind the counter sharpening a sword.";
	text2 = "She stops as you approach and holds out her hand.";
	text3 = "_Welcome to my store._ she says.  _I'm Thalia._";
	text4 = "_Would you like to see something in particular or are you just browsing?_ she asks.";
	text5 = "Thalia is polishing a spear head behind the counter.";
	text6 = "As you get close, she stops and says _Back again, huh._";
	action = INTRO;

begintalknode 52;
	state = 52;
	personality = 537;
	nextstate = -1;
	condition = 1;
	question = "What do you sell?";
	text1 = "Thalia answers _I have a supply or weaponry for the safety conscious traveler._";
	text2 = "_If it kills, I have it._ she adds.";

begintalknode 53;
	state = 52;
	personality = 537;
	nextstate = -1;
	condition = 1;
	question = "Can I see your stock?";
	text1 = "You complete your weapon shopping.";
	code =
		begin_shop_mode("Swords and More", "Thalia has a selection of weaponry available for sale.  The prices are average.", 3, 3, -1);
	break;

begintalknode 54;
	state = 52;
	personality = 537;
	nextstate = -1;
	condition = 1;
	question = "What do you know about the sewers.";
	text1 = "Thalia replies _Nothing.  The city sealed the covers to keep children out after a couple drown._";
	text2 = "_Since then, they do what they are designed to do_ she adds.";

begintalknode 55;
	state = 52;
	personality = 537;
	nextstate = -1;
	condition = 1;
	question = "Bye.";
	text1 = "Thalia waves as you leave _Come back again._ she says.";
	action = END_TALK;

// *** Nancy ***
begintalknode 61;
	state = -1;
	personality = 538;
	nextstate = 62;
	condition = 1;
	question = "Nancy";
	text1 = "You see a woman repairing a leather suit.";
	text2 = "As you get closer, she says _Welcome to my store.  I'm Nancy._";
	text3 = "_Take a look around and let me know if you see anything you like._ she says.";
	text5 = "You approach Nancy yet again.";
	text6 = "_Thought you'd take another look, huh?_ she asks.";
	action = INTRO;

begintalknode 62;
	state = 62;
	personality = 538;
	nextstate = -1;
	condition = 1;
	question = "What do you sell here?";
	text1 = "_I have a selection of armor for the adventurous type._ Nancy says.";
	text2 = "_Got some good stuff here if you want to look around._";

begintalknode 63;
	state = 62;
	personality = 538;
	nextstate = -1;
	condition = 1;
	question = "I like to see some armor.";
	text1 = "You finish looking over the armor Nancy has for sale.";
	code =
		begin_shop_mode("Philippi Coverings", "Nancy has a stock of armor pieces for sale.  The prices are pretty average.", 4, 3, -1);
	break;

begintalknode 64;
	state = 62;
	personality = 538;
	nextstate = -1;
	condition = 1;
	question = "So long.";
	text1 = "_See ya later._ Nancy says.";
	action = END_TALK;

// *** Jodie ***
begintalknode 71;
	state = -1;
	personality = 539;
	nextstate = 72;
	condition = 1;
	question = "Jodie";
	text1 = "A woman is waiting behind the counter for customers to come in.";
	text2 = "She smiles and says _My name is Jodie._";
	text3 = "_Let me know if you need help._";
	text5 = "Jodie smiles as you get close.";
	text6 = "_Can I help you find something?_ she asks.";
	action = INTRO;

begintalknode 72;
	state = 72;
	personality = 539;
	nextstate = -1;
	condition = 1;
	question = "What do you sell here?";
	text1 = "_I have a variety of items that many find useful in their day to day lives._ Jodie replies.";
	text2 = "She waves her hands towards the shelves behind her _I run the general store here._";
	text3 = "Jodie continues _Let me know if you need something you see._";

begintalknode 73;
	state = 72;
	personality = 539;
	nextstate = -1;
	condition = 1;
	question = "I'd like to see your goods.";
	text1 = "You finish shopping.";
	code =
		begin_shop_mode("General Store", "Jodie sells a bunch of common items.  The prices are pretty average.", 6, 3, -1);
	break;

begintalknode 74;
	state = 72;
	personality = 539;
	nextstate = -1;
	condition = 1;
	question = "Don't need nothing now, thanks.";
	text1 = "Jodie says _Well I'm here if you do, good bye._";
	action = END_TALK;

// *** Gelidia ***
begintalknode 81;
	state = -1;
	personality = 540;
	nextstate = 82;
	condition = 1;
	question = "Gelidia";
	text1 = "From behind a pile of stuff laying on the counter, you hear a voice.";
	text2 = "_Just a sec._ you hear, then a woman's face joins the voice.";
	text3 = "_Name's Gelidia, what can I do for you?_ she asks.";
	text5 = "Gelidia looks up from writing in a ledger at the counter.";
	text6 = "_Got some more stuff for me?_ she asks.";
	action = INTRO;

begintalknode 82;
	state = 82;
	personality = 540;
	nextstate = -1;
	condition = 1;
	question = "What do you do?";
	text1 = "Gelidia replies _I run the pawn shop here in Philippi._";
	text2 = "_Need money or just need to get rid of things, I'll help._";
	text3 = "_Do you need money or have something you no longer need?_ she asks.";

begintalknode 83;
	state = 82;
	personality = 540;
	nextstate = -1;
	condition = 1;
	question = "Any path into the sewers?";
	text1 = "Gelidia answers _None that I know of._";
	text2 = "She continues _But I have heard that some of the covers were not sealed close to the docks._";
	text3 = "_You know some children died down there don't you?_ she asks.";

begintalknode 84;
	state = 82;
	personality = 540;
	nextstate = -1;
	condition = 1;
	question = "I'd like to sell some things.";
	text1 = "You finish selling off what you don't need.";
	code =
		begin_shop_mode("Philippi Pawn", "Gelidia will give coins for items.  She does not pay a lot.", 5, 6, 5);
	break;

begintalknode 85;
	state = 82;
	personality = 540;
	nextstate = -1;
	condition = 1;
	question = "Bye.";
	text1 = "_Bye bye, come back again._ Gelidia says as you walk away.";
	action = END_TALK;
